<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
$this->group(['domain' => env('DOMAIN_ADMIN')], function() {
	$this->get('/', 'IndexController@indexPage');
	//显示所有地区
	$this->get('/view/all/district', 'AdminCommonController@getDistrict');
});


$this->group(['domain' => env('DOMAIN_ADMIN'),'prefix' => '/'], function() {
	//显示个人信息
	$this->get('view/admininfo', 'AdminInfoController@getInfo');

	//查询当前登录用户权限列表
	$this->get('view/admininfo/permission', 'AdminInfoController@getUserPermission');

	//查询个人信息,全局调用
	$this->get('view/admininfo/common', 'AdminInfoController@getInfoCommon');
	//csrf延长
	$this->get('view/csrf', 'AdminInfoController@getCSRF');
	//更新个人信息
	$this->post('update/admininfo', 'AdminInfoController@updateInfo');
	//上传个人头像
	$this->post('update/admininfo/avatar', 'AdminInfoController@updateAvatar');
});